<template>
	<view class="nav_bar">
		<text class="backFont" v-if="props.backFont" @click="goBack">返回</text>
		<text class="title_font">
			{{props.title}}
		</text>
		<view class="right_btn_con">
			<slot name = 'right_btn'>
				
			</slot>
		</view>
		
	</view>
</template>

<script lang="ts" setup>
	const props = defineProps(["backFont","title"])
	console.log(props.title);
	const goBack = () => {
		uni.navigateBack()
	}
</script>

<style>
	.nav_bar{
		width: 100vw;
		box-sizing: border-box;
		height: 11vh ;
		background-color: #fff;
		display: flex;
		align-items: center;
		padding: 0 3vw ;
		padding-top: 3vh;
		position: fixed;
		top: 0;
		z-index: 10000;
	}
	.backFont{
		justify-content: flex-start;
		margin-right: 5vw;
	}
	.title_font{
		margin: auto;
	}
	.right_btn_con{
		width: 13vw;
		height: 8vh;
		display: flex;
		align-items: center;
	}
</style>